StupidBeauty
Read times:821Posted at:Tue Feb 18 18:55:23 2014
- no title specified

Wt 3.3.1文档翻译: Wt::WEnvironment类参考,Wt::WEnvironment Class Reference

详细说明

这个类,保存了关于程序的环境信息的快照。

环境(environment)提供了关于客户端浏览器的信息,以及服务器的启动参数的信息。

使用示例:

const WEnvironment& env = WApplication::instance ()-> environment ();

// 读取一个程序启动参数

// (作为URL中的参数传递,或者是被传送(POST)给程序)。

if (!env.getParameterValues("login").empty()) {

std::string login = env. getParameterValues ( "login" )[0];

...

}

// 在使用只支持AJAX 的部件之前,检查JavaScript/AJAX 的可用性

Wt::WTextArea *textEdit;

if (!env.ajax())

textEdit = new Wt::WTextEdit (); // 提供一个HTML文本编辑器

else

textEdit = new Wt::WTextArea (); // 回退到普通的旧文本区域部件。

成员函数文档

const std::string * Wt::WEnvironment::getCookieValue

(

const std::string &

cookieName )

const

返回一个小甜饼(cookie)值。

如果对应的小甜饼不存在,则返回0。

参考

getCookie()

未知美人

未知美人

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands